package org.pp.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Map;

@Setter
@Getter
public class MiniappCartVo {
    @Schema(description = "购物车id")
    private Long cartId;

    @Schema(description = "封面")
    private String cover;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "库存")
    private Integer stock;

    @Schema(description = "0为普通购物车，1为直接购买")
    private Boolean type;

    @Schema(description = "商品规格")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Map<String,String> attrInfo;

    @Schema(description = "商品规格 拼接")
    private String attrInfoStr;

    @Schema(description = "数量")
    private Integer amount;

    @Schema(description = "sku的id")
    private Long skuId;

    @Schema(description = "售价")
    private BigDecimal price;

}
